/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import dao.d_doctor;
import dao.d_ficha;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author May
 */
public class doctor {
    String cedula;
    String nombre;
    String apellido;

    public String getCedula() {
        return cedula;
    }

    public void setCedula(String cedula) {
        this.cedula = cedula;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getApellido() {
        return apellido;
    }

    public void setApellido(String apellido) {
        this.apellido = apellido;
    }
    
    public boolean BuscaXid_SeteaObjetoDoctor() {
        try {
            doctor aux;
            d_doctor aspectoDB = new d_doctor();
            aux = aspectoDB.buscarDoctor(this.cedula);
            
            if(aux!=null){
            setNombre(aux.getNombre());
            setApellido(aux.getApellido());
           
             return true;
            }else{
               return false;}     
            } catch (SQLException ex) {
            Logger.getLogger(doctor.class.getName()).log(Level.SEVERE, null, ex);
            }
        return false;
    }
  
}
